var cookie = {
    set:function(name,value,days){
      var d = new Date();
      d.setDate(d.getDate() + days);
      document.cookie = name + "=" + value +";expires=" + d+";";
     },
    get:function(name){
      var cookiesArr = document.cookie.split("; ")
      for(var i = 0;i< cookiesArr.length;i++){
        var newArr = cookiesArr[i].split("=");
        if(name === newArr[0]){
          return newArr[1]
         }
       }
     },
    unset:function(name){
      this.set(name,"",-1)
     }
  }
  